Enhancements to the Gnat/SNiFF+ Integration

1. The modifications to SNiFF+'s make support

The SNiFF+ make support for Gnat has been extended to include the capability to generate a .o file from a single specified source file. This makes easier the process of  compiling and testing modifications to a single source file.

To invoke the functionality, use the custom menu "Gnat:Make .o from <file> " in the Project Editor. Sniffmake will be invoked to generate a corresponding .o file from the specified source.

2. User-extensible code completion facility

Also available is the user-extensible code completion facility which has been added to enhance the Ada-specific capabilities of the Source Editor. This facility is implemented in the python language (file InitAdaSyntaxExpansion.py) and may be modified and/or extended with the addition of further Ada language constructs. To use the facility in the case of an Ada 'for' loop, type in the Ada keyword 'for' in the Source Editor, then invoke the code expansion facility after the keyword (see below). The expansion consists of keywords and placeholder fields. The user may then skip to a particular placeholder field and replace it with Ada code.

To invoke the code expansion facility:
 - Place the cursor in an Ada file after an occurrence of the keyword (eg 'for') 
 - Type Shift-Tab
 - Type it again to look for an alternative expansion
 - Type F2 or Control-. or Control-, to jump from place holder to place holder

3. Ada comment insertion facility

The 'Comment Selection' button and 'Edit>Comment' Menu of the Source Editor unfortunately insert C++ comments into Ada source files. A separate Ada comment insertion/removal facility has been implemented in the python language.

To insert an Ada comment use the key sequence 

  Esc i c

and to remove a comment, the key sequence

  Esc r c

4. Installation
 
Please note that this integration relies on python language functionality which is only available under Sniff 3.1 or later. The following files are required:

 - UserMenus.sniff
 - GnatDialogs.py
 - general.ada.mk
 - InitAdaSyntaxExpansion.py
 - Editor.py
 - InitAdaComment.py


The file UserMenus.sniff implements the Gnat custom menu in the Sniff project editor. Its contents should be incorporated with any existing UserMenus.sniff or SiteMenus.sniff file (as described in the chapter, Advanced Customizing Options, of the Sniff Reference Guide).

The file GnatDialogs.py should be placed in Sniff's standard python dialogs directory: 
$SNIFF_DIR/lib/python/Sniff/dialogs

The file general.ada.mk should be placed in Sniff's make support directory:
$SNIFF_DIR/make_support

The file InitAdaSyntaxExpansion.py implements the code completion facility and should be placed in the directory:
$SNIFF_DIR/sniff31GA/config/editor

The file Editor.py implements comment insertion/removal and should replace the file of the same name in the directory:
$SNIFF_DIR/lib/python/Sniff

The file InitAdaComment.py implements comment insertion/removal and should be placed in the directory:
$SNIFF_DIR/sniff31GA/config/editor

